﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="SearchByAtt.aspx.vb" Inherits="Assignment_2___Prototype.SearchByAtt" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">

        .transparent
        {
            margin-left: 364px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        &nbsp;</p>

    
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource2" style="margin-left: 173px" Width="113px">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="TagName" 
                DataNavigateUrlFormatString="SearchByAtt.aspx?TagName={0}" 
                DataTextField="TagName" HeaderText="Tag" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
        SelectCommand="SELECT [TagName] FROM [Tags]"></asp:SqlDataSource>
    <p>
        &nbsp;</p>
    <p>
        <br />
    </p>
    <p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" 
            AllowSorting="True" CssClass="transparent"  
            PagerStyle-CssClass="pgr"  
            AlternatingRowStyle-CssClass="alt"
            CellPadding="4" ForeColor="#333333" 
            GridLines="None">
            <AlternatingRowStyle CssClass="alt" ></AlternatingRowStyle>



            <Columns>
                <asp:BoundField DataField="Species" HeaderText="Species" 
                    SortExpression="Species" />
                <asp:BoundField DataField="TagName" HeaderText="TagName" 
                    SortExpression="TagName" />
            </Columns>


        <EditRowStyle BackColor="#7C6F57" />
        <FooterStyle BackColor="#1C5E55" ForeColor="White" Font-Bold="True" />
        <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <PagerStyle CssClass="pgr" BackColor="#666666" ForeColor="White" HorizontalAlign="Center"></PagerStyle>
        <RowStyle BackColor="#E3EAEB" />
        <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F8FAFA" />
        <SortedAscendingHeaderStyle BackColor="#246B61" />
        <SortedDescendingCellStyle BackColor="#D4DFE1" />
        <SortedDescendingHeaderStyle BackColor="#15524A" />


        </asp:GridView>


        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            
            
            
            SelectCommand="SELECT DISTINCT [Species], [TagName] FROM [Parrot-Tag Query] WHERE ([TagName] = ?)">
            <SelectParameters>
                <asp:QueryStringParameter Name="TagName" QueryStringField="TagName" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    </asp:Content>
